<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Hello</title>

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/css/bootstrap.min.css" integrity="sha256-eSi1q2PG6J7g7ib17yAaWMcrr5GrtohYChqibrV7PBE=" crossorigin="anonymous">
</head>
<body>

<div class="container-fluid">
    <div class="row">
        <div class="col-md-3">
        </div>
        <div class="col-md-6">
            <div class="row">
                <div class="col-md-12">
                    <h2>
                        Please login first.
                    </h2>
                    <p th:if="${loginError}" th:text="${errorMsg}">用户名密码错误！</p>
                    <form role="form" th:action="@{/login}" method="post">
                        <div class="form-group">
                            <label>
                                Username
                            </label>
                            <input type="text" class="form-control" name="username" />
                        </div>
                        <div class="form-group">

                            <label>
                                Password
                            </label>
                            <input type="password" class="form-control" name="password" />
                        </div>
                        <div class="checkbox">

                            <label>
                                <input type="checkbox" name="remember-me" /> Remember me
                            </label>
                        </div>
                        <button type="submit" class="btn btn-primary">
                            Login
                        </button>
                    </form>
                </div>
            </div>
        </div>
        <div class="col-md-3">
        </div>
    </div>
</div>

</body>
</html>